// filename: utility.h
// author: enic
// date: 2016-03-14

#pragma once

#include <cocos2d.h>
#include <xstring>
#include "../XLib/XBase/string_utf_convert.h"

namespace EZFY
{
	namespace utility
	{
		inline bool AddPlistToSpriteFrameCache(const std::wstring& strPlist)
		{
			cocos2d::SpriteFrameCache::getInstance()->addSpriteFramesWithFile(XU16TLocal(strPlist));

			return true;
		}

		inline bool AddPlistToSpriteFrameCache(std::vector<std::wstring> vecPlistFile)
		{
			for each (std::wstring strPlist in vecPlistFile)
			{
				AddPlistToSpriteFrameCache(strPlist);
			}

			return true;
		}
	}
}
